Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new experimental setting chat.tools.terminal.enforceTimeoutFromModel to enable timeout enforcement for terminal commands executed via the run-in-terminal tool. When enabled, the model can specify a timeout duration for commands, and the tool will stop tracking after that duration and return partial output.
Key changes:
- Added
EnforceTimeoutFromModelconfiguration setting as an experimental feature - Extended the tool schema to include a required
timeoutparameter - Implemented timeout handling that cancels command execution and returns partial output when timeout is reached
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts | Adds new experimental setting EnforceTimeoutFromModel with boolean type, defaulting to false |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Adds timeout parameter to tool schema, implements timeout enforcement logic with cancellation and partial output collection |
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts:232
- The timeout parameter is marked as 'required' in the tool schema, but it's defined as optional in the IRunInTerminalInputParams interface with 'timeout?:'. This inconsistency means the model must always provide a timeout value, but the code treats it as optional. Either remove 'timeout' from the required array, or change the interface to make it non-optional (timeout:).
required: [
'command',
'explanation',
'isBackground',
'timeout',
meganrogge
approved these changes
Jan 8, 2026
Collaborator
meganrogge
left a comment
There was a problem hiding this comment.
I'm slightly worried about giving this control over to the model, but 🤷🏼♀️ we shall see!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #286598